﻿<Window x:Class="ServerApplication.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:oxy="clr-namespace:OxyPlot.Wpf;assembly=OxyPlot.Wpf"
        Title="MainWindow" Height="732.224" Width="1014.785">

    <Grid Background="AliceBlue">
        <Grid.ColumnDefinitions>
            <ColumnDefinition/>
            <ColumnDefinition Width="Auto"/>
        </Grid.ColumnDefinitions>
        <TabControl HorizontalAlignment="Left" Height="623" Margin="138,33,0,0" VerticalAlignment="Top" Width="737">
            <!-- graph tab-->
            <TabItem Header="Peer Details">
                <Grid Background="#FFE5E5E5">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="300*"/>
                        <ColumnDefinition Width="431*"/>
                    </Grid.ColumnDefinitions>
                    <DataGrid x:Name="PeerStatus" HorizontalAlignment="Left" Margin="188,44,0,0" VerticalAlignment="Top" Height="518" Width="505" Grid.ColumnSpan="2"/>
                    <Ellipse x:Name="monitoringBulb" Fill="Red" HorizontalAlignment="Left" Height="34" Margin="28,44,0,0" Stroke="Black" VerticalAlignment="Top" Width="32"/>
                </Grid>
            </TabItem>

            <TabItem Header="Server Details">
                <Grid Background="#FFE5E5E5">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="205*"/>
                        <ColumnDefinition Width="526*"/>
                    </Grid.ColumnDefinitions>
                    <Button x:Name="Start_Button" Content="Start server" HorizontalAlignment="Left" Margin="17,206,0,0" VerticalAlignment="Top" Width="120" Click="Start_Click" Background="Black" Foreground="White" Grid.Column="1"/>
                    <Button x:Name="Start_Button_Copy" Content="Stop Server" HorizontalAlignment="Left" Margin="17,248,0,0" VerticalAlignment="Top" Width="120"  Background="Black" Foreground="White" Click="Start_Button_Copy_Click" Grid.Column="1"/>
                    <Ellipse x:Name="serverOnline" Fill="Red" HorizontalAlignment="Left" Height="34" Margin="209,222,0,0" Stroke="Black" VerticalAlignment="Top" Width="32" Grid.Column="1"/>
                    <Button x:Name="Start_Button_Copy1" Content="Start Gate Keeper" HorizontalAlignment="Left" Margin="17,287,0,0" VerticalAlignment="Top" Width="120"  Background="Black" Foreground="White" Click="Start_Button_Copy_Click" Grid.Column="1"/>
                </Grid>
            </TabItem>
            <TabItem Header="Config File Details">
                <Grid Background="#FFE5E5E5">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="17*"/>
                        <ColumnDefinition Width="91*"/>
                        <ColumnDefinition Width="414*"/>
                        <ColumnDefinition Width="10*"/>
                        <ColumnDefinition Width="199*"/>
                    </Grid.ColumnDefinitions>

                    <Button Content="New Config File" HorizontalAlignment="Left" Margin="66.763,479,0,0" VerticalAlignment="Top" Width="116" Click="Button_Click_2" Grid.ColumnSpan="2" Grid.Column="1"/>
                    <Label Content="Config Loc:" HorizontalAlignment="Left" Margin="41.763,43,0,0" VerticalAlignment="Top" Width="97" Grid.ColumnSpan="2" Grid.Column="1"/>
                    <TextBox x:Name="directroy" HorizontalAlignment="Left" Margin="33,45,0,0" TextWrapping="Wrap" Background="White"  Text="Location" VerticalAlignment="Top" Height="26" Width="121" Grid.Column="2"/>
                    <Button Content="VerifyLocation" HorizontalAlignment="Left" Margin="178,46,0,0" VerticalAlignment="Top" Width="90" Click="VerifyLocation_Click" Grid.Column="2"/>
                    <Label Content="amountPeers" HorizontalAlignment="Left" Margin="66.763,121,0,0" VerticalAlignment="Top" Width="146" Grid.ColumnSpan="2" Grid.Column="1"/>
                    <TextBox x:Name="amountPeers" Background="White" HorizontalAlignment="Left" Margin="231,131,0,0" TextWrapping="Wrap" Text="5" VerticalAlignment="Top" Width="295" Grid.ColumnSpan="3" Grid.Column="2"/>
                    <Label Content="gatekeeperIp" HorizontalAlignment="Left" Margin="66.763,145,0,0" VerticalAlignment="Top" Width="146" Grid.ColumnSpan="2" Grid.Column="1"/>
                    <TextBox x:Name="gatekeeperIp" Background="White" HorizontalAlignment="Left" Margin="231,155,0,0" TextWrapping="Wrap" Text="127.0.0.1" VerticalAlignment="Top" Width="295" Grid.ColumnSpan="3" Grid.Column="2"/>
                    <Label Content="pathNumber" HorizontalAlignment="Left" Margin="66.763,166,0,0" VerticalAlignment="Top" Width="146" Grid.ColumnSpan="2" Grid.Column="1"/>
                    <TextBox x:Name="pathNumber" Background="White" HorizontalAlignment="Left" Margin="231,176,0,0" TextWrapping="Wrap" Text="3" VerticalAlignment="Top" Width="295" Grid.ColumnSpan="3" Grid.Column="2"/>
                    <Label Content="intervalForBenchmark" HorizontalAlignment="Left" Margin="66.763,190,0,0" VerticalAlignment="Top" Width="223" Grid.ColumnSpan="2" Grid.Column="1"/>
                    <TextBox x:Name="intervalForBenchmark" Background="White" HorizontalAlignment="Left" Margin="231,200,0,0" TextWrapping="Wrap" Text="0.200" VerticalAlignment="Top" Width="295" Grid.ColumnSpan="3" Grid.Column="2"/>
                    <Label Content="timeAfterCommAtempt" HorizontalAlignment="Left" Margin="66.763,216,0,0" VerticalAlignment="Top" Width="146" Grid.ColumnSpan="2" Grid.Column="1"/>
                    <TextBlock x:Name="timeAfterCommAttempt" Background="White" HorizontalAlignment="Left" Margin="231,226,0,0" TextWrapping="Wrap" Text="0.250" VerticalAlignment="Top" Width="295" Grid.ColumnSpan="3" Grid.Column="2"/>
                    <Label Content="timeSleepAfterFailedAttempt" HorizontalAlignment="Left" Margin="66.763,237,0,0" VerticalAlignment="Top" Width="178" Grid.ColumnSpan="2" Grid.Column="1"/>
                    <TextBox x:Name="timeSleepAfterFailedAttempt" Background="White" HorizontalAlignment="Left" Margin="231,247,0,0" TextWrapping="Wrap" Text="0.500" VerticalAlignment="Top" Width="295" Grid.ColumnSpan="3" Grid.Column="2"/>
                    <Label Content="useNetwork" HorizontalAlignment="Left" Margin="66.763,263,0,0" VerticalAlignment="Top" Width="146" Grid.ColumnSpan="2" Grid.Column="1"/>
                    <TextBox x:Name="useNetwork" Background="White" HorizontalAlignment="Left" Margin="231,273,0,0" TextWrapping="Wrap" Text="1" VerticalAlignment="Top" Width="295" Grid.ColumnSpan="3" Grid.Column="2"/>
                    <Label Content="socketNumber" HorizontalAlignment="Left" Margin="66.763,289,0,0" VerticalAlignment="Top" Width="146" Grid.ColumnSpan="2" Grid.Column="1"/>
                    <TextBox x:Name="socketNumber" Background="White" HorizontalAlignment="Left" Margin="231,299,0,0" TextWrapping="Wrap" Text="20012" VerticalAlignment="Top" Width="295" Grid.ColumnSpan="3" Grid.Column="2"/>
                    <Label Content="peerName" HorizontalAlignment="Left" Margin="66.763,310,0,0" VerticalAlignment="Top" Width="146" Grid.ColumnSpan="2" Grid.Column="1"/>
                    <TextBox x:Name="peerName" Background="White" HorizontalAlignment="Left" Margin="231,320,0,0" TextWrapping="Wrap" Text="Tester" VerticalAlignment="Top" Width="295" Grid.ColumnSpan="3" Grid.Column="2"/>
                    <Label Content="sceneType" HorizontalAlignment="Left" Margin="66.763,336,0,0" VerticalAlignment="Top" Width="146" Grid.ColumnSpan="2" Grid.Column="1"/>
                    <TextBox x:Name="sceneType" Background="White" HorizontalAlignment="Left" Margin="231,346,0,0" TextWrapping="Wrap" Text="9" VerticalAlignment="Top" Width="295" Grid.ColumnSpan="3" Grid.Column="2"/>
                    <Label Content="windowSize" HorizontalAlignment="Left" Margin="66.763,362,0,0" VerticalAlignment="Top" Width="146" Grid.ColumnSpan="2" Grid.Column="1"/>
                    <TextBox x:Name="windowSize" Background="White" HorizontalAlignment="Left" Margin="231,372,0,0" TextWrapping="Wrap" Text="600" VerticalAlignment="Top" Width="295" Grid.ColumnSpan="3" Grid.Column="2"/>
                    <Label Content="mt" HorizontalAlignment="Left" Margin="66.763,388,0,0" VerticalAlignment="Top" Width="146" Grid.ColumnSpan="2" Grid.Column="1"/>
                    <TextBox x:Name="mt" Background="White" HorizontalAlignment="Left" Margin="231,398,0,0" TextWrapping="Wrap" Text="8" VerticalAlignment="Top" Width="295" Grid.ColumnSpan="3" Grid.Column="2"/>
                    <Label Content="useRandomPath" HorizontalAlignment="Left" Margin="66.763,409,0,0" VerticalAlignment="Top" Width="146" Grid.ColumnSpan="2" Grid.Column="1"/>
                    <TextBox x:Name="useRandomPath" Background="White" HorizontalAlignment="Left" Margin="231,419,0,0" TextWrapping="Wrap" Text="1" VerticalAlignment="Top" Width="295" Grid.ColumnSpan="3" Grid.Column="2"/>
                    <Label Content="pathConfigFile" HorizontalAlignment="Left" Margin="66.763,435,0,0" VerticalAlignment="Top" Width="146" Grid.ColumnSpan="2" Grid.Column="1"/>
                    <TextBox x:Name="pathConfigFile" Background="White" HorizontalAlignment="Left" Margin="231,445,0,0" TextWrapping="Wrap" Text="PathCheckpoints/TownCheckPointsConfig.txt" VerticalAlignment="Top" Width="295" Grid.ColumnSpan="3" Grid.Column="2"/>
                </Grid>
            </TabItem>
            <TabItem Header="Peer Status">
                <Grid Background="#FFE5E5E5">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="127*"/>
                        <ColumnDefinition Width="604*"/>
                    </Grid.ColumnDefinitions>
                    <DataGrid  x:Name="allPeers" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Height="405" Margin="70,91,40,99" Grid.Column="1"/>
                    <Button Content="Start Selected"  HorizontalAlignment="Left" Margin="51,91,0,0" VerticalAlignment="Top" Width="130" Height="21" Grid.ColumnSpan="2" Click="StartSelectedPeers_Click"/>
                    <Button Content="Terminate Selected" HorizontalAlignment="Left" Margin="51,168,0,0" VerticalAlignment="Top" Width="130" Grid.ColumnSpan="2" Click="StopSelectedPeers_Click"/>
                    <Button Content="Terminate All" HorizontalAlignment="Left" Margin="51,143,0,0" VerticalAlignment="Top" Width="130" Grid.ColumnSpan="2" Click="StopAllPeers_Click"/>
                    <Button Content="Start All" HorizontalAlignment="Left" Margin="51,117,0,0" VerticalAlignment="Top" Width="130" Height="21" Grid.ColumnSpan="2" Click="StartAllPeers_Click" />
                </Grid>
            </TabItem>
        </TabControl>

    </Grid>
</Window>
